<template>
  <div v-show="dialog" class="img-dialog" @click.stop="dialog=false">
    <el-carousel ref="imgCarousel" :autoplay="false" :arrow="imgs.length>1?'hover':'never'" indicator-position="outside">
      <el-carousel-item v-for="item in imgs" :key="item.index" style="height: 700px">
        <img :src="item.url" alt="">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script>
export default {
  name: 'MineMask',
  props: {
    imgs: {
      type: Array,
      required: true
    }
  },
  data() {
    return {
      dialog: false
    }
  }
}
</script>
<style rel="stylesheet/scss" lang="scss">
  .img-dialog {
    width: 100vw;
    height: 100vh;
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    top: 0;
    left: 0;

    .el-carousel {
      width: 1000px;
      height: 700px;
      text-align: center;

      .el-carousel__container {
        height: 700px;

        .el-carousel__item{
          display: inline-flex;
          align-items: center;
          justify-content: space-around;
          background: #fff;

          img {
            min-width: 500px;
            max-width: 900px;
            max-height: 650px;
            vertical-align: middle;
          }
        }
      }

      .el-carousel__indicators {
        display: none;
      }

      .el-carousel__arrow {
        width: 80px;
        height: 80px;

        i {
          font-size: 60px;
          color:#333;
        }
      }
    }
  }
</style>
